﻿using System;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.IO;

namespace ConsoleApp4
{
    class Program
    {
        static void Main(string[] args)
        {
            DirectoryInfo directoryInfo = new DirectoryInfo("D:\\MySolo");
            directoryInfo.Create();

            //directoryInfo.CreateSubdirectory("test.txt");这个是创建文件夹

            Console.WriteLine("驱动器的名称:"+directoryInfo.Name);

            FileStream fs = new FileStream("D:\\MySolo\\test.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite);

            StreamWriter sw = new StreamWriter(fs);
            sw.WriteLine("你是人间四月天");
            sw.Close();


        }
    }
}
